# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3Dataset do
  @moduledoc """
  A singleton resource under a Processor which configures a collection of documents.

  ## Attributes

  *   `documentWarehouseConfig` (*type:* `GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig.t`, *default:* `nil`) - Optional. Deprecated. Warehouse-based dataset configuration is not supported.
  *   `gcsManagedConfig` (*type:* `GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig.t`, *default:* `nil`) - Optional. User-managed Cloud Storage dataset configuration. Use this configuration if the dataset documents are stored under a user-managed Cloud Storage location.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset`
  *   `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `spannerIndexingConfig` (*type:* `GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig.t`, *default:* `nil`) - Optional. A lightweight indexing source with low latency and high reliability, but lacking advanced features like CMEK and content-based search.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Required. State of the dataset. Ignored when updating dataset.
  *   `unmanagedDatasetConfig` (*type:* `GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig.t`, *default:* `nil`) - Optional. Unmanaged dataset configuration. Use this configuration if the dataset documents are managed by the document service internally (not user-managed).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :documentWarehouseConfig =>
            GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig.t()
            | nil,
          :gcsManagedConfig =>
            GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig.t()
            | nil,
          :name => String.t() | nil,
          :satisfiesPzi => boolean() | nil,
          :satisfiesPzs => boolean() | nil,
          :spannerIndexingConfig =>
            GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig.t()
            | nil,
          :state => String.t() | nil,
          :unmanagedDatasetConfig =>
            GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig.t()
            | nil
        }

  field(:documentWarehouseConfig,
    as:
      GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig
  )

  field(:gcsManagedConfig,
    as: GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig
  )

  field(:name)
  field(:satisfiesPzi)
  field(:satisfiesPzs)

  field(:spannerIndexingConfig,
    as:
      GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig
  )

  field(:state)

  field(:unmanagedDatasetConfig,
    as:
      GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3Dataset do
  def decode(value, options) do
    GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3Dataset.decode(value, options)
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DocumentAI.V1beta2.Model.GoogleCloudDocumentaiV1beta3Dataset do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
